package stream;

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamDemo {
    public static void main(String[] args) {
//        Consumer<Integer> consumer=item-> System.out.println(item);
//        Function<Integer,Integer> function=item->item*10;

        List<Integer> list = List.of(4, 2, 1, 9, 8, 3, 7);
        List<Integer> list2 = list.stream()
                .filter(item -> item % 2 == 1)
                .map(item -> item * 10)
                .sorted((a, b) -> b - a)
                .collect(Collectors.toList());




    }
}
